# Replication Data for: Structural Cointegration of the Climate--Carbon Feedback

This repository contains the replication code and data for the analysis of Antarctic temperature and atmospheric CO2 feedbacks over the last 130,000 years.

## 1. File Inventory and Data Sources

The following raw data files (CSV format) are required to run the provided Stata do-file (PALEOCOINT.do). Each file corresponds to a specific paleoclimatic or astronomical source:

| File Name (in Code) | Original Source / Dataset | Description |
|:---|:---|:---|
| **CO2_raw.csv** | *antarctica2015co2.xls* (Bereiter et al., 2015) | Antarctic Ice Cores Revised 800KYr CO2 Data (Composite Record). |
| **Temperature_raw.csv** | *edc3deuttemp2007-noaa.txt* (Jouzel et al., 2007) | EPICA Dome C - 800KYr Deuterium Data and Temperature Estimates. |
| **Insolation_raw.csv** | IMCCE Insolation Service (Laskar et al., 2004) | Orbital forcing data computed via [IMCCE Online Service](https://vo.imcce.fr/insola/earth/online/earth/online/index.php). |

## 2. Prerequisites

### Software
- **Stata** (Tested on version 16 or later)

### External Stata Packages
The analysis requires the following user-written packages. You can install them within Stata using:
```stata
ssc install ivreg2
ssc install ranktest
ssc install egranger

```

## 3. How to Reproduce the Results

1. Place `PALEOCOINT.do` and the three CSV files in the same working directory.
2. Open the do-file and set the working directory path at the beginning of the script.
3. Run the script. It will perform the following steps:
* Data cleaning and 1,000-year grid alignment.
* Unit root and cointegration tests (Tables 1-2).
* VECM estimation for ESS (Table 3).
* IV-GMM structural identification of CTR/CCR (Tables 4-5).



## 4. Citation

If you use these codes or data, please cite the following original studies:

* Bereiter, B., et al. (2015). Nature, 453(7193).
* Jouzel, J., et al. (2007). Science, 317(5839).
* Laskar, J., et al. (2004). Astronomy & Astrophysics, 428(1).
